home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / jjbqc.zip / JJBSHOW1.C < prev    next >
C/C++ Source or Header  |  1993-01-04  |  7KB  |  154 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. /****************************************************************************
  8.  *                                                                          *
  9.  *                           JJBSHOW1.C                                     *
  10.  *                                                                          *
  11.  *   Copyright (c) 1989, JJB. All rights reserved.                          *
  12.  *                                                                          *
  13.  *                                                                          *
  14.  *   This example shows the Quick C programmer the basic concepts of JJB.   *
  15.  *   Just glance at it and move on to example JJBSHOW2.C.                   *
  16.  *                                                                          *
  17.  *   If you want to run this program, from DOS:                             *
  18.  *                                                                          *
  19.  *         Enter 'JJBS1'    ( to load this file with JJB.QLB)               *
  20.  *         Press 'F5'       ( to compile and begin executing)               *
  21.  *                                                                          *
  22.  *    If you have any problems, see JJBREAD.ME 'problems'.                  *
  23.  *    Otherwise you should be executing this program after pressing F5.     *
  24.  *                                                                          *
  25.  *    The screen you will see is similiar to Quick C.                       *
  26.  *    Ignore the 'not yet assigned' message.                                *
  27.  *                                                                          *
  28.  *    You may press 'ALT' and select an option.                             *
  29.  *    The option selected is displayed in the bottom left of screen.        *
  30.  *                                                                          *
  31.  *    Quick C is a trademark of Microsoft Corp.                             *
  32.  *    JJB, 9236 church Rd suite 1082, Dallas, Tx 75231 (214) 341-1635       *
  33.  ****************************************************************************/
  34.  
  35.  
  36. /****************************************************************************
  37.  *                                                                          *
  38.  * To make the .exe file JJBSHOW1.EXE for this program, from DOS enter:     *
  39.  *                                                                          *
  40.  *     QCL  /c  /AM  JJBSHOW1.C                                             *
  41.  *     LINK  JJBSHOW1.OBJ + JJB.OBJ,,, C:LIB\,                              *
  42.  *                                                                          *
  43.  ***************************************************************************/
  44.  
  45.  
  46. /* see JJBGLOSS.DOC for an additional explanation of the functions below.  */
  47.  
  48. #include "c:\bin\jjbset.h"
  49.  
  50.  
  51. main()
  52.   {
  53.     jjb_initalize();        /* initalizes all JJB arrays & video    */
  54.  
  55.     jjb_setup();            /* setup options & assign functions     */
  56.  
  57.     jjb_start();            /* start executing the default option   */
  58.  
  59.  
  60.   }
  61.  
  62.  
  63.  
  64.  
  65.  
  66. /****************************************************************************
  67.  *                                                                          *
  68.  *                       jjb_setup()                                        *
  69.  *                                                                          *
  70.  *   jjb_setup() is where you define how your pull down menus will look     *
  71.  *   for for each group and option.                                         *
  72.  *                                                                          *
  73.  *   This example shows you how to begin.                                   *
  74.  *                                                                          *
  75.  *   The string descriptions have no meaning.                               *
  76.  *   You may change them to any description you wish.                       *
  77.  *                                                                          *
  78.  *   Notice how easily you can assign function keys F2 thru F8.             *
  79.  *                                                                          *
  80.  *   You may have up to 10 groups and 50 total options.                     *
  81.  *   Any one group can have any number of options.                          *
  82.  *                                                                          *
  83.  *      'group('  starts a new group of options.                            *
  84.  *      'option(' starts an option.                                         *
  85.  *      ' ' lets you specify any keypress for the options.                  *
  86.  *          Otherwise JJB will use the first, second, or third letter.      *
  87.  *      ',DRAWLINE' can be used to separate an option.                      *
  88.  *      'default_opt()' tells JJB to start with and default to this option  *
  89.  *                                                                          *
  90.  ****************************************************************************/
  91.  
  92.  
  93.  
  94. /* JJB CAN BE USED FOR ANY APPLICATION. BELOW IS JUST AN EXAMPLE.         */
  95.  
  96. jjb_setup() {
  97.     /* use the set( function below to show you the JJB setup    */
  98.     /* set(SHOWSETUP_SW,T);  */
  99.  
  100.     group("File");
  101.         option("Access");
  102.         option("Update file");
  103.         option("Merge");
  104.         option("Copy");
  105.         option("Copy and Mer'g'e   ",DRAWLINE);
  106.  
  107.         option("Create file",DRAWLINE);
  108.  
  109.         option("List");
  110.         option("List 'P'artially",DRAWLINE);
  111.  
  112.         option("Text search");
  113.         option("Replace text");
  114.  
  115.  
  116.     group("Enter");
  117.         option("Master records  F4");
  118.         option("Activity",DRAWLINE);
  119.  
  120.         option("Anything you want for any application");
  121.         option("Special report descriptions   F5");
  122.         option("Special 'K'eys",DRAWLINE);
  123.  
  124.         option("Setup configuration");
  125.         option("Color selections");
  126.  
  127.     group("Reports");
  128.         option("Daily reports");
  129.         option("Monthly");
  130.         option("Annual",DRAWLINE);
  131.  
  132.         option("Special 'F'oken reports");
  133.         option("Activity 'J'ournals   F6",DRAWLINE);
  134.  
  135.         option("Send reports to asc file    ",DRAWLINE);
  136.         option("Print all reports");
  137.  
  138.     group("Other");
  139.         option("Press the ALT key now");
  140.            default_opt(); /* JJB will now default to above option */
  141.         option("This is just an option description");
  142.         option("It is stored in an array");
  143.         option("And placed on the screen");
  144.         option("For your user to use in selecting options");
  145.         option("You may assign function names to these descriptions");
  146.         option("which will be executed when you select the option");
  147.  
  148.         option("JJB has over 30 arrays which it uses to maintain");
  149.         option("control over option selection and execution.");
  150.  
  151.     }
  152.  
  153.  
  154.